﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PlutoStudio.Domain.Entities.Auditing
{
    public abstract class AuditedEntity : AuditedEntity<int>, IEntity
    {
    }

    public abstract class AuditedEntity<TKey> : AuditedEntity<TKey, int>, IAudited
    {

    }

    public abstract class AuditedEntity<TKey, TUserKey> : CreationAuditedEntity<TKey, TUserKey>, IModificationAudited<TUserKey>
        where TUserKey : struct
    {
        public TUserKey? LastModifierUserId { get; set; }

        public DateTime? LastModificationTime { get; set; }
    }

    public abstract class AuditedEntity<TKey, TUser, TUserKey> : AuditedEntity<TKey, TUserKey>, ICreationAudited<TUser, TUserKey>, IModificationAudited<TUser, TUserKey>
        where TUserKey : struct
        where TUser : IEntity<TUserKey>
    {
        public TUser LastModifierUser { get; set; }
        public TUser CreatorUser { get; set; }
    }

}
